git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd6e5cd
)
seed random from ruby interface
author
Matthias Kramm
<kramm@quiss.org>
Tue, 6 Apr 2010 18:13:34 +0000
(11:13 -0700)
committer
Matthias Kramm
<kramm@quiss.org>
Tue, 6 Apr 2010 18:13:34 +0000
(11:13 -0700)
lib/ruby/gfx.c
patch
|
blob
|
history
diff --git
a/lib/ruby/gfx.c
b/lib/ruby/gfx.c
index
3227449
..
7c48a09
100644
(file)
--- a/
lib/ruby/gfx.c
+++ b/
lib/ruby/gfx.c
@@
-1,4
+1,5
@@
#include <ruby.h>
+#include "../../config.h"
#include "../gfxdevice.h"
#include "../gfxsource.h"
#include "../gfxtools.h"
@@
-765,6
+766,14
@@
VALUE gfx_setparameter(VALUE module, VALUE _key, VALUE _value)
void Init_gfx()
{
initLog(0,0,0,0,0,2);
+#ifdef HAVE_SRAND48
+ srand48(time(0));
+#else
+#ifdef HAVE_SRAND
+ srand(time(0));
+#endif
+#endif
+
pdfdriver = gfxsource_pdf_create();
swfdriver = gfxsource_swf_create();
imagedriver = gfxsource_image_create();